<div id="content">
          <div class="filter_bar" style="margin-bottom:3px;"><div class="fb_title"><?php echo strip_tags($detail->post_title); ?></div></div>
          <div id="post-activity">
            <div class="left like-btn">
                <div class="fb-like" data-href="<?php echo $permalink ?>" data-send="true" data-layout="button_count" data-width="200" data-show-faces="true"></div>
            </div>
            <?php if(!empty($viewmore)): ?>
            <div class="right post-navigator">
                <?php if(!empty($viewmore[1])): ?>
                <a class="nav-prev" href="<?php echo permalink(array('text' => $viewmore[1]->post_title, 'id' => $viewmore[1]->id)) ?>">Trước</a>
                <?php endif; ?>
                |
                <?php if(!empty($viewmore[0])): ?>
                <a class="nav-next" href="<?php echo permalink(array('text' => $viewmore[0]->post_title, 'id' => $viewmore[0]->id)) ?>">Sau</a>
                <?php endif; ?>
            </div>
            <?php endif; ?>
            </div>
          <div id="content_inner" class="detail_content">
            <?php if(in_array($detail->item_type, array('photo', 'gif'))): ?>
            <img src="<?php echo FARM_URL.$detail->post_image ?>" />
            <?php elseif($detail->video_code != ''): ?>
            <script type="text/javascript" src="<?php echo STATIC_URL ?>/jwplayer/jwplayer.js"></script>
            <script type="text/javascript">jwplayer.key="xg7iFCWixrDgR/+3QbcunkhSm4KGcNXVD5xrEzQyerSO5tqPDkQACfWlCIQ=";</script>
            <div id="videoPlayer"></div>
            <script>
                jwplayer("videoPlayer").setup({
                    file: "http://www.youtube.com/watch?v=<?php echo youtubeVideoExtractor($detail->video_code) ?>",
                    image: "<?php echo FARM_URL.'/'.$detail->post_image; ?>",
                    height: 360,
                    width: 640
                });
            </script>
            
            <?php endif; ?>
          </div><!--content_inner ends-->
          <div id="top_comment" display:none;><p class="box_title">Thánh phán</p>
            <p class="comment_text" id="cmt-text"></p>
            <p class="comment_author" id="cmt-author"></p>
          </div>
          <script type="text/javascript">
          $(document).ready(function(){
            $.ajax({
              url: "<?php echo BASE_URL.'/ajax/topfbcmt' ?>",
              type: 'POST',
              dataType: 'json',
              data: {'url':'<?php echo $permalink; ?>'},
              }).done(function(data){
                  if(data.top){
                      $('#cmt-text').html(data.top.message);
                      $('#cmt-author').html('<a href="http://www.facebook.com/'+data.top.from.id+'" target="_blank">'+data.top.from.name+'</a>');
                      $('#top_comment').show();
                  }
            });
          });
          </script>
          <div id="comments">
            <div class="post-bottom">
                <div class="left">Bình luận</div>
                <div class="right"><a href="#" class="report-post">Báo cáo</a></div>
            </div>
            <div class="fb-comments" data-href="<?php echo $permalink ?>" data-width="600" data-num-posts="20"></div>
          </div>
	</div>